<template>
  <PageMain>
    <template #header></template>
    <template #body>
      <div class="main-container">
        <CellDesc title="企业经营洞察"  :list="list"/>
        <CellDesc title="数据评价"  :list="assessList"/>
        <div>
          <CellTitle  title="资源数据"/>
          <Tables :columns='dataColumns' operatorInfo="查看资源" @goToDetails="godataDetails"></Tables>
        </div>
        <div>
          <CellTitle  title="关联项目"/>
          <Tables :columns='projcetColum' operatorInfo="查看详情" @goToDetails="goAssociationDetails"></Tables>
        </div>
        <div>
          <CellTitle  title="数据来源"/>
          <Tables :columns='sourceColum' operatorInfo="查看关联" @goToDetails="goSourceDetails"></Tables>
        </div>
        <div>
          <CellTitle  title="第三方认证"/>
          <Tables :columns='authenticationColumn' operatorInfo="查看详情" @goToDetails="goreport_details"></Tables>
        </div>
        <div>
          <CellTitle  title="凭证关联"/>
          <Tables :columns='projcetColum' operatorInfo="查看详情" @goToDetails="govoucher_details"></Tables>
        </div>
        <div>
          <CellTitle  title="资产摊销"/>
          <Tables :columns='projcetColum' operatorInfo="查看详情"></Tables>
        </div>
        <div>
          <CellTitle  title="资产减值"/>
          <Tables :columns='projcetColum' operatorInfo="查看详情"></Tables>
        </div>
      </div>
    </template>
  </PageMain>
</template>

<script setup lang=ts>
import PageMain from '@/components/PageBox.vue';
import { ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import CellDesc from '../components/CellDesc.vue';
import CellTitle from "../components/CellTitle.vue";
import Tables from "../components/Tables.vue";
const route = useRoute()
const router = useRouter()
let list = ref([
  {
    name:"资产主体：",
    value:"上海鸿运鼎盛房地产开发有限公司"
  },
  {
    name:"资产判定：",
    value:"无形资产"
  },
  {
    name:"资产版本：",
    value:"V1.0",
    isTip:true
  },
  {
    name:"入表状态：",
    value:"已确认"
  },
  {
    name:"合规情况：",
    value:"资产合规"
  },
  {
    name:"登记情况：",
    value:"已登机"
  },
  {
    name:"资产入表金额：",
    value:"200000万元"
  },
])

let assessList = ref([
  {
    name:"资产主体：",
    value:"上海鸿运鼎盛房地产开发有限公司"
  },
  {
    name:"资产判定：",
    value:"无形资产"
  },
  {
    name:"资产版本：",
    value:"V1.0",
  }
])

const dataColumns = [
      {
        title: '数据表名',
        dataIndex: 'name',
      },
      {
        title: '创建人',
        dataIndex: 'salary',
      },
      {
        title: '创建时间',
        dataIndex: 'address',
      },
      {
        title: '操作',
        slotName: 'operator',
        dataIndex: 'email',
        width: 100,
        fixed: 'right',
      }
    ]

const projcetColum = [
      {
        title: '项目名称',
        dataIndex: 'name',
      },
      {
        title: '项目进度',
        dataIndex: 'salary',
      },
      {
        title: '开始时间',
        dataIndex: 'address',
      },
      {
        title: '结束时间',
        dataIndex: 'address',
      },
      {
        title: '操作',
        slotName: 'operator',
        dataIndex: 'email',
        width: 100,
        fixed: 'right',
      }
    ]
    const sourceColum = [
      {
        title: '资产名称',
        dataIndex: 'name',
      },
      {
        title: '数据来源',
        dataIndex: 'salary',
      },
      {
        title: '关联主体',
        dataIndex: 'address',
      },
      {
        title: '操作',
        slotName: 'operator',
        dataIndex: 'email',
        width: 100,
        fixed: 'right',
      }
    ]

    const authenticationColumn = [
      {
        title: '认证类型',
        dataIndex: 'name',
      },
      {
        title: '报告名称',
        dataIndex: 'salary',
      },
      {
        title: '上传人',
        dataIndex: 'address',
      },
      {
        title: '上传时间',
        dataIndex: 'address',
      },
      {
        title: '操作',
        slotName: 'operator',
        dataIndex: 'email',
        width: 100,
        fixed: 'right',
      }
    ]   

const godataDetails = (value:any) => {
  router.push({
    name:"lookAsset",
    query:value
  });
}    

const goAssociationDetails = (value:any) => {
  router.push({
    name:"lookRelation",
    query:value
  });
}  

const goSourceDetails = (value:any) => {
  router.push({
    name:"LookBloodtiesdetail",
    query:value
  });
}  

const govoucher_details = (value:any) => {
  router.push({
    name:"VoucherDetail",
    query:value
  });
}  

const goreport_details = (value:any) => {
  router.push({
    name:"ProerrtycheckReport",
    query:value
  });
}  
</script>
<style lang="less" scoped>
.main-container{
  height: 100%;
  overflow-y: scroll;
  padding: 0 24px 20px;
}
</style>
